package com.wfg.myswagger.demo.controller;

import com.wfg.myswagger.demo.entity.ClassRoom;
import com.wfg.myswagger.demo.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class UserController {

    /**
     * 获取用户信息999
     * @param user
     * @return
     */
    @GetMapping("getuser")
    public User getUser(User user){
        User user1 = new User();
        user1.setUserName("dddd");
        ClassRoom classRoom = new ClassRoom();
        classRoom.setName("123456");
        user1.setClassRoom(classRoom);
        return user1;
    }
}
